﻿CREATE TABLE [dbo].[ResourceMonth] (
    [Id]                      INT            IDENTITY (1, 1) NOT NULL,
    [ResourceId]              INT            NULL,
    [GocAttributes]           VARCHAR (20)   NULL,
    [LocalCode]               VARCHAR (20)   NULL,
    [BusinessId]              INT            NULL,
    [OperateId]               INT            NULL,
    [FMBDescription]          VARCHAR (50)   NULL,
    [HumanResourceId]         INT            NULL,
    [JobTitleId]              INT            NULL,
    [GlobalFunction]          VARCHAR (50)   NULL,
    [EmployeeClassId]         INT            NULL,
    [FullOrPartTime]          CHAR (1)       NULL,
    [RegOrTemp]               CHAR (1)       NULL,
    [DirectFlag]              CHAR (1)       NULL,
    [DirectCount]             DECIMAL (3, 2) NULL,
    [FTE]                     DECIMAL (6, 2) NULL,
    [FTEType]                 INT            NULL,
    [TotalHour]               DECIMAL (6, 2) NULL,
    [StandardHour]            DECIMAL (6, 2) NULL,
    [WorkingMonth]            DATETIME       NULL,
    [BusinessContactId]       INT            NULL,
    [VendorId]                INT            NULL,
    [Currency]                VARCHAR (20)   NULL,
    [BillRate]                DECIMAL (6, 2) NULL,
    [LocationId]              INT            NULL,
    [DomicileCountryId]       INT            NULL,
    [ExpenseCode]             VARCHAR (20)   NULL,
    [OUCId]                   INT            NULL,
    [OfficerId]               INT            NULL,
    [HrResponsibleGeId]       VARCHAR (20)   NULL,
    [DirectManagerResourceId] INT            NOT NULL,
    [LastUpdate]              DATETIME       NOT NULL,
    [ReferenceDate]           DATETIME       NOT NULL,
    [HumanResourceDeptId]     VARCHAR (50)   NOT NULL,
    [ManagedGeographyId]      VARCHAR (50)   NULL,
    FOREIGN KEY ([HumanResourceDeptId]) REFERENCES [dbo].[HumanResourceDept] ([Id]) ON DELETE NO ACTION ON UPDATE NO ACTION,
    FOREIGN KEY ([ManagedGeographyId]) REFERENCES [dbo].[ManagedGeography] ([Id]) ON DELETE NO ACTION ON UPDATE NO ACTION
);





